package com.yyx.service;

import org.junit.jupiter.api.Test;
import org.redisson.api.RedissonClient;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;

@SpringBootTest
public class AddVoucherToRedis {

    @Resource
    RedisTemplate redisTemplate;

    @Resource
    RedissonClient redissonClient;

    @Test
    public void addvoucher(){
        redisTemplate.opsForValue().set("seckill:stock" + 1,"20");
    }
    @Test
    public void  addorder(){
        redissonClient.getSet("order:stock"+1);
    }
}
